package com.anlen.call.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.anlen.call.R;
import com.anlen.call.base.BaseActivity;

public class MoreActivity extends BaseActivity implements OnClickListener{
	private RelativeLayout rlnote;
	private RelativeLayout rldial;
	private RelativeLayout rlmap;
	private RelativeLayout rlsuggesstion;
	
	private TextView textnote;
	private TextView textdial;
	private TextView textmap;
	private TextView textsuggestion;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setup();
	}
	
	@Override
	public void onClick(View v) {
		switch(v.getId()){
			case R.id.rlPurMoreNote : 
				showToast((String)textnote.getText());
				break;
			case R.id.rlPurMoreDial : 
				showToast((String)textdial.getText());
				break;
			case R.id.rlPurMoreMap :
				showToast((String)textmap.getText());
				break;
			case R.id.rlPurMoreSuggestion :
				showToast((String)textsuggestion.getText());
				break;
			case R.id.tvPurMoreLogin:
				Intent intent=new Intent(MoreActivity.this,PersonalFriends.class);
				startActivity(intent);
			default :
				break;
		}
		
	}
	
	private void setup() {
		setContentView(R.layout.app_more);
		
		
		rlnote =  (RelativeLayout)MoreActivity.this.findViewById(R.id.rlPurMoreNote);
		rldial =  (RelativeLayout)MoreActivity.this.findViewById(R.id.rlPurMoreDial);
		rlmap = (RelativeLayout)MoreActivity.this.findViewById(R.id.rlPurMoreMap);
		rlsuggesstion =  (RelativeLayout)MoreActivity.this.findViewById(R.id.rlPurMoreSuggestion);
		
		
		textnote = (TextView)MoreActivity.this.findViewById(R.id.note);
		textdial = (TextView)MoreActivity.this.findViewById(R.id.dial);
		textmap = (TextView)MoreActivity.this.findViewById(R.id.map);
		textsuggestion = (TextView)MoreActivity.this.findViewById(R.id.suggestion);
		
		
		TextView tlogin = (TextView)MoreActivity.this.findViewById(R.id.tvPurMoreLogin);
		
		rlnote.setOnClickListener(this);
		rldial.setOnClickListener(this);
		rlmap.setOnClickListener(this);
		rlsuggesstion.setOnClickListener(this);
	
		
		tlogin.setOnClickListener(this);
	}
}
